# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Language.V1.Model.XPSVideoObjectTrackingEvaluationMetrics do
  @moduledoc """
  Model evaluation metrics for ObjectTracking problems. Next tag: 10.

  ## Attributes

  *   `boundingBoxMeanAveragePrecision` (*type:* `number()`, *default:* `nil`) - Output only. The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.
  *   `boundingBoxMetricsEntries` (*type:* `list(GoogleApi.Language.V1.Model.XPSBoundingBoxMetricsEntry.t)`, *default:* `nil`) - Output only. The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
  *   `evaluatedBoundingboxCount` (*type:* `integer()`, *default:* `nil`) - The number of bounding boxes used for model evaluation.
  *   `evaluatedFrameCount` (*type:* `integer()`, *default:* `nil`) - The number of video frames used for model evaluation.
  *   `evaluatedTrackCount` (*type:* `integer()`, *default:* `nil`) - The number of tracks used for model evaluation.
  *   `trackMeanAveragePrecision` (*type:* `number()`, *default:* `nil`) - Output only. The single metric for tracks accuracy evaluation: the mean_average_precision averaged over all track_metrics_entries.
  *   `trackMeanBoundingBoxIou` (*type:* `number()`, *default:* `nil`) - Output only. The single metric for tracks bounding box iou evaluation: the mean_bounding_box_iou averaged over all track_metrics_entries.
  *   `trackMeanMismatchRate` (*type:* `number()`, *default:* `nil`) - Output only. The single metric for tracking consistency evaluation: the mean_mismatch_rate averaged over all track_metrics_entries.
  *   `trackMetricsEntries` (*type:* `list(GoogleApi.Language.V1.Model.XPSTrackMetricsEntry.t)`, *default:* `nil`) - Output only. The tracks match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :boundingBoxMeanAveragePrecision => number() | nil,
          :boundingBoxMetricsEntries =>
            list(GoogleApi.Language.V1.Model.XPSBoundingBoxMetricsEntry.t()) | nil,
          :evaluatedBoundingboxCount => integer() | nil,
          :evaluatedFrameCount => integer() | nil,
          :evaluatedTrackCount => integer() | nil,
          :trackMeanAveragePrecision => number() | nil,
          :trackMeanBoundingBoxIou => number() | nil,
          :trackMeanMismatchRate => number() | nil,
          :trackMetricsEntries => list(GoogleApi.Language.V1.Model.XPSTrackMetricsEntry.t()) | nil
        }

  field(:boundingBoxMeanAveragePrecision)

  field(:boundingBoxMetricsEntries,
    as: GoogleApi.Language.V1.Model.XPSBoundingBoxMetricsEntry,
    type: :list
  )

  field(:evaluatedBoundingboxCount)
  field(:evaluatedFrameCount)
  field(:evaluatedTrackCount)
  field(:trackMeanAveragePrecision)
  field(:trackMeanBoundingBoxIou)
  field(:trackMeanMismatchRate)
  field(:trackMetricsEntries, as: GoogleApi.Language.V1.Model.XPSTrackMetricsEntry, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Language.V1.Model.XPSVideoObjectTrackingEvaluationMetrics do
  def decode(value, options) do
    GoogleApi.Language.V1.Model.XPSVideoObjectTrackingEvaluationMetrics.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Language.V1.Model.XPSVideoObjectTrackingEvaluationMetrics do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
